Class_name = "CTurret"
object_name = "TurretHandleyPage400_1M2"

[COCKPIT_LIMITS]
x= -0.25, 0.25
y= -0.05, 0.3
z= -0.4, 0.4
[END]

[OPEN_COCKPIT_LIMITS]
x= -0.25, 0.25
y= -0.05, 0.3
z= -0.5, 0.5
[END]

VisualImage=0,"graphics/Planes/HandleyPage400/HandleyPage400-C1-M2-low.mgm",1
VisualImage=1,"graphics/Planes/HandleyPage400/HandleyPage400-C1-M2.mgm",0
KeepNetworkImages=true

CollisionBody="graphics/Planes/HandleyPage400/HandleyPage400-C1-M2.col"

VisualRadius=5.0

mp_site=true

[attach=0]
	position = 0.0, 0.0, -0.01
	object = "LuaScripts/WorldObjects/Bots/BotGunner_HP400fwdM_RAF17.txt"
[end]

[attach=1]
	position = 0.0, 0.0, 0.0
	object = "LuaScripts/WorldObjects/TurretRiffle.txt"
[end]

[attach=2]
	position = 0.0, 0.0, 0.0
	object = "LuaScripts/WorldObjects/TurretCamera.txt"
[end]

TargetingScript = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_ENG_7-7x56_APsmk.bin"

SoundScript="LuaScripts/Sound/Planes/HandleyPage400_T1_M2.cfg"

Script="LuaScripts\ObjectScripts\Planes\_case_Davis.sc"

DropsArg=100
HumidityArg=101

SetCockpitArgs=false	// true -             , false -              

//CockpitArg= FetchType, CmdID, SubcmdID, ArgNum, ArgValDefault, SmoothingType, SmoothingPower, NetworkFlag
//FetchType=-1:       
//FetchType=-2:         
//FetchType=-3:          parent-
//FetchType>=0:          child-   Attach ID
//CmdID=[0..999]: ID    ,    .
//CmdID=[1000..1999]: ID    ,    .
//SubcmdID=[0..3]: ID     .
//SubcmdID=[0..1]: ID     .
//ArgNum:     / .
//ArgValDefault:      ,    .
//SmoothingType: smooth_clamp -  - 
//SmoothingType: smooth_wrap -   
//SmoothingPower:   
//NetworkFlag="":           ,  SetCockpitArgs=false
//NetworkFlag="low_freq":     ,       ,    
//NetworkFlag="med_freq":     ,       ,    
//NetworkFlag="high_freq":     ,       ,    
//NetworkFlag="granted_single":     ,       ,     

//CockpitArg = -2, 0000, 0, 9181, 0.0, "smooth_clamp", 0.0, "granted_single" //     
//CockpitArg = -2, 0001, 0, 9044, 0.0, "smooth_clamp", 0.5, "med_freq" //     

[TurretsPos=0]
	position = 0.406743, 0.469154, 0.290687
	PosMoveArg = 21300
	SeatArg=22111
	SeatUpTime=1.0
	SeatDownTime=1.0

	ReloadDelay = 0.3
	BotRotaionValueZ = 0.0	//-2.0
	LegsParameter = 0.0
	BotMinFirstAngle  = -20
	BotMaxFirstAngle  = 20
	BotMinSecondAngle = 27
	BotMaxSecondAngle = 60
	FirstToSecondInterp = 0.0
	BotAttachJointId = 0
	BotFirstAnimJointId = 0
	BotSecondAnimJointId  = 1

	relativeBotStand = 0.0, 0.0, 0.0
	relativeBotSit = 0.0, 0.0, 0.0
	relativeBotDead = 0.0, 0.0, 0.0
	TransitionStandPower = 1
	TransitionDeadPower = 1
	
	LockTurretCamera=false
	
	// Joints in orientation order!!!
	[Joint=0]
		SectorAngleMin = -20.0
		SectorAngleMax = 20.0
		DefaultPos = 0.5

		AngularSpeed   = 30.0

		AnimationArgMin = 0.388889
		AnimationArgMax = 0.611111

		AnimationArgNum = 21006

		Point = 0, 0.121212, 0.0
		Axis  = 0.0, 1.0, 0.0

		SoundNumber = 1
	[end]

	[Joint=1]
		SectorAngleMin = 27.0
		SectorAngleMax = 60.0
		DefaultPos = 1.0

		AngularSpeed   = 30.0

		AnimationArgMin = 0.65
		AnimationArgMax = 0.833333

		AnimationArgNum = 21007

		Point = 0,0,0
		Axis  = 0.0, 0.0, 1.0

		SoundNumber = 1

		NoMoveFar=true	// Block rotation when the target is in the rear henisphere
	[end]

	[GunAnimation=0]
		FireArg = 64101
		CockingArg = 9044
	[end]

	[GunAnimation=1]
		FireArg = 60320
	[end]

//	FireLightArg=60220

	SightPosition = 0.0, 0.5, 0.0

	defaultDirection = 1.0, -1.732051, 0.0
	AimSector=-30, 30, -70, -20	//AI aim limits: left, right, down, up

	CamDisplacement = -0.438743, 0.149634, -0.253687
[end]

[TurretsGun=0]
	LinkedTurretPos = 0
//	Convex = "gun0"
	DGroup="Gun"
	DamageProp = 0.25
	AC = true //    tc_fire,  false
	MG = false //    tc_fire_secondary,  false

	ShowAutoReloading = true //   GUI      ( )

	Displacement = 1.5776, 0.0734, 0.0
	GunsightPosition = 0.0, 0.0734, 0.0
	ParallaxDistance = 400.0

	GunType = "LuaScripts/WorldObjects/Weapons/_Davis.txt"

	ReLoadingStagesTime = 1.0, 2.0, 1.0, 0.3

	TriggerPositionArgIdx = 9000
//	FiringPinPositionArgIdx = 9102
//	DrawAnimationArgIdx = 0, 9103	//    
//	AmmunitionMovingArgIdx = 9105
	AzimuthDeviationArgIdx = 9012
	ElevationDeviationArgIdx = 9013
//	ReservedMagazinesArgIdx = 9108
//	RoundsInMagazineArgIdx = 0
	HideAmmunitionArgIdx = 9045
//	ReLoadingArgIdx = 9111
//	FlashAnimationArgIdx = 64101
	CartridgesTotalArgIdx = 9181
	MaxRoundsTotal = 12

	BarrelTemperatureDecreaseCorrectionData = 1.0, 4.0, 300.0 //         :
	//   -        , [.], (>=0), default = 1
	//   -        ,       ,   , [.], (>=  ),  : 1.0
	//   -      ,              , [/], (>=0),  : 0.0

	CarriageAdditionalBulletDispertionAngle = 0.0368, 0.1838 //     ()     ,      :
	//   -        , [], (>=0)
	//   -          , [], (>=  )

	NumOfAnimations = 1

	SoundNumber = 1
[end]

[TurretsGun=1]
	LinkedTurretPos = 0
//	Convex = "gun1"
	DGroup="MachineGun"
	DamageProp = 0.25
	AC = false //    tc_fire,  false
	MG = true //    tc_fire_secondary,  false

	Displacement = 0.991257, 0.209634, -0.020687
	GunsightPosition = 0.0, 5.0, -0.020687
	ParallaxDistance = 100.0

	GunType = "LuaScripts/WorldObjects/Weapons/MG_ROF_Lewis.txt"

	ReLoadingStagesTime = 1.0, 3.0, 1.0, 0.3

	ReservedMagazinesArgIdx = 9182
	FlashAnimationArgIdx = 9140
	TriggerPositionArgIdx = 9100
	RoundsInMagazineArgIdx = 9146
	HideAmmunitionArgIdx = 9145
	ReLoadingArgIdx = 9144
	AzimuthDeviationArgIdx = 9112
	ElevationDeviationArgIdx = 9113
	FiringPinPositionArgIdx = 9116

	BarrelTemperatureDecreaseCorrectionData = 1.0, 4.0, 300.0 //         :
	//   -        , [.], (>=0), default = 1
	//   -        ,       ,   , [.], (>=  ),  : 1.0
	//   -      ,              , [/], (>=0),  : 0.0

	CarriageAdditionalBulletDispertionAngle = 0.0368, 0.1838 //     ()     ,      :
	//   -        , [], (>=0)
	//   -          , [], (>=  )

	NumOfAnimations = 4

	BushCoord = 0.194257, 0.192634, -0.010687
	BushSpeed = 0.0, 0.0, 1.0

	BushConfig = "LuaScripts/WorldObjects/Trash/Batch_case07-08mm.txt"

	SoundNumber = 2
[end]

[Ammunition0]
	GunAmmunition0=0
	GunAmmunition1=1
[end]
[GunAmmunition0]
	RoundsInMagazine = 13
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_ENG_57x390_CV.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_ENG_57x390_CV.txt"
[end]
[GunAmmunition1]
	MaxRoundsInMagazine = 97
	RoundsInMagazine = 97
	MaxReservedMagazines = 2
	ReservedMagazines = 2
	MaxMisFiresInMagazine = 1
	AmountRoundsWithOneTracer = 1
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_ENG_7-7x56_APsmk.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_ENG_7-7x56_APsmk.txt"
[end]

SightPos = 0.0, 0.2, 0.0
PositionChangeTime = 1.0
StandDuration = 4.0
SitDuration = 4.0
PreEjectDuration = 4.0
FreezeOnReload = false
AutoRecharge = true


//   ,         
//SectorLimits = -180.0, -145.0, +20.0, +90.0

[Entrance]
	EntrancePos= -2.403,-0.708,0
	EntranceRot= 0,0,0
	JumpDir=0,-6,1
[end]
[Entrance]
	EntrancePos= 0.0, -0.1, 0.0
	EntranceRot= 0,0,0
	JumpDir=-2,6,1
	SelectorDir=0,2,0	//        2/
[end]
EjectOnlyAfterPreviousGunner = false

// Damage

CockpitSafetyRate = 0.35 //impact accelerations affect on bot treshold multiplifier (default is =1.0)

SphereHitProtection=0	//  /     

Armor=0
LifeRate=50000
LifeRateFrag=5000
Firing=0.0

energyloss="",true,0.7,1000 //     , true -       -,       ,        
energyloss="gun0",true,5.0,20000 // 

[DGroup=Gun]
	IsCritical=false
	LifeK=20
	convex="gun0",5,600,"MT_ARMOR"
	SphereHitProtection=5
	LifeRateFrag=600
	RepairSpeed=0.0166667	// (1 )
	RepairSource=4
	InstantRepair=true
[end]
[DGroup=MachineGun]
	IsCritical=false
	LifeK=20
	convex="gun1",5,600,"MT_ARMOR"
	SphereHitProtection=5
	LifeRateFrag=600
	RepairSpeed=0.0166667	// (1 )
	RepairSource=4
	InstantRepair=true
[end]

[trashspawner]
	[spawn=0]
		solidtrash="LuaScripts\WorldObjects\Trash\PlaneTrash\DavisGun_case.txt"
//		Position=0.0,0.0,-0.55
		Position=-0.4,-0.1,0.0
		Rotation=0,90,0
		convex="gun0",false	//false: Attach object relative to  convex (not absolute)
		SpawnDir=0,-2,0
	[end]
[end]

NoAimingWhenOpened=false

AttackDistance   = 1500.0		//AI max aim distance versus ground point
AttackDistanceTrgGnd = 1500.0	//AI max aim distance versus ground target
AttackDistanceTrgAir = 2000.0		//AI max aim distance versus air target

AIStartAimErrModifier = 0.08		//0.1 Modifier for AI initial bracketing aim error (reduced twice with each shot)

AIAimDelayModifier = 0.1		//Modifier for AI delay before start to aim to a new target at 1000m range

ReArmTime=15 //  60,     -2  2 
